package es.empresa.domain.admin;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import java.util.Date;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Set;
import java.util.HashSet;
import javax.persistence.ManyToMany;
import javax.persistence.CascadeType;

import es.empresa.domain.admin.Pedido;

@RooJavaBean
@RooToString
@RooEntity
public class Cuenta {

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date fecha;

    private String mesa;

    private Float total;

    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Pedido> pedidos = new HashSet<Pedido>();
}
